#pragma once


#include <iostream>
#include <cmath>
#include <opencv.hpp>
#include <vector>

using namespace std;
using namespace cv;

#define TEST_D


typedef class IMG_PROCESS
{
public:
	IMG_PROCESS();
	~IMG_PROCESS();

	int interfaceFun(cv::Mat inputImg);
	int interfaceFun(string filePath);

	int getRoiImg();
	int getHistogram(cv::Mat grayImg);
	int getBinaryThreshold();
	int findValidRegionBaseline();

private:

	Mat m_SrcImg;
	Mat m_BinImg;
	Mat m_RoiImg;

	cv::Vec4f m_baseline;
	double m_rotationAngle;

	int *mp_histogram;
	int m_SrcImgW;
	int m_SrcImgH;
	int m_RoiImgH;
	int m_RoiImgW;

	int m_BinaryThreshold;
	RotatedRect m_RoiRotRect;

}ImgProcess;